import request from "@/utils/request"

export default {
  getScriptList(data) {
    return request({
      url: "/cscript/getcscriptList",
      method: "post",
      params: {
        token: data.token,
        cid: data.cid,
        pageNo: data.pageNo,
        pageSize: data.pageSize
      }
    })
  },

  getCollegeName(data) {
    return request({
      url: "/college/getCollege",
      method: "post",
      params: {
        cid: data.cid
      }
    })
  },

  addScript(data) {
    return request( {
      url: "cscript/add_cscript",
      method: "post",
      params: {
        token: data.token,
        cid: data.cid,
        csid: '',
        ckey: data.keyword,
        value: data.content
      }
    })
  },

  deleteScript(data) {
    return request( {
      url: "cscript/del_cscript",
      method: "post",
      params: {
        token: data.token,
        cid: data.cid,
        csid: data.csid,
        ckey: '',
        value: ''
      }
    })
  }
}
